[cmake] move ExternalProject_Add to subdir for consistency, and define proper GSL,FFTW,TBB targets#21904
[cmake] move ExternalProject_Add to subdir for consistency, and define proper GSL,FFTW,TBB targets#21904ferdymercury wants to merge 8 commits intoroot-project:masterfrom
Conversation
c5e599c to
cb03ce1
Compare
Test Results 22 files 22 suites 3d 4h 49m 28s ⏱️ For more details on these failures, see this check. Results for commit 78db3b5. ♻️ This comment has been updated with latest results. |
1f27c07 to
283614a
Compare
|
@bellenot could you let me know what is the contents (filenames) inside:
Or alternatively, what targets are defined once you run find_package with the new FindFFTW.cmake script in this branch ? |
|
@ferdymercury here is the content of And I'll try your branch... |
|
@ferdymercury BTW, what is the problem with FFTW? |
|
Here are (some of) the errors on Windows: Hard to tell where they are coming from (i.e, which DLL is not found). I'll have to debug it locally |
The current FindFFTW.cmake did not define a proper target so I borrowed a more up-to-date one by @egpbos but it seems it had a bug for Win32. I just fixed it so that it now finds all variants of FFTW3 correctly on Windows. |
|
@ferdymercury FYI the issue is coming from TBB. I'm looking into it |
85f47df to
e9b6bcd
Compare
19375c8 to
63ee525
Compare
113a3d3 to
070cca6
Compare
hageboeck
left a comment
There was a problem hiding this comment.
This is a good opportunity to make the builtins conform to what find modules would output. This means that we need to set the following variables (from here):
Xxx_INCLUDE_DIRS
Xxx_LIBRARIES
We also need to remember that:
- They must not be CACHE variables
- And they need to be set in the
PARENT_SCOPEnow that they are in subdirectories
I see that for some deps, this is done, for others it's not, so we have a chance now to unify this.
7df4697 to
33bdcd1
Compare
[cmake] try define proper gsl builtin target canonical names by findgsl [gsl] fix install path
Thanks, good idea. I have fixed most now. Additional fixes are in the corresponding PRs: In any case, if/when all these are in, I was planning to do an additional uniformization formatting PR, meaning all builtins should start with the same lines: and have all |
cea8b88 to
4329664
Compare
4329664 to
78db3b5
Compare
hageboeck
left a comment
There was a problem hiding this comment.
Thanks for the updates! I found a few more things to look at. Do we know the licence of the file that you copied?
| -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
| -DCMAKE_CXX_FLAGS=${GTEST_CXX_FLAGS} | ||
| -DCMAKE_AR=${CMAKE_AR} | ||
| -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} |
There was a problem hiding this comment.
If I'm not mistaken, this would try to install gtest in something like /usr/local. Instead of disabling the install command, once could make this:
${CMAKE_BINARY_DIR}/builtins/gtest
| -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} | |
| -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/builtins/googletest |
Edit: I see that you only moved that code over. I think we can leave it for a later time to simplify this file a bit.
There was a problem hiding this comment.
Yep, just moved. Shall I apply all / none / or a part of the commits you suggested on this file?
There was a problem hiding this comment.
There is also VDT building in binary-dir rather than in builtins/ as the others but did not change that either. Was thinking to do the uniformization later on transversally for all once we get the overview of all.
| set_target_properties(${lib} PROPERTIES | ||
| IMPORTED_LOCATION "${_G_LIBRARY_PATH}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}" | ||
| ) | ||
| add_dependencies(${lib} googletest) |
There was a problem hiding this comment.
Let's add the "canonical" names that are now used in ROOT:
| add_dependencies(${lib} googletest) | |
| add_dependencies(${lib} googletest) | |
| add_library(GTest::${lib} ALIAS ${lib}) |
| # - Find the FFTW library | ||
| # https://github.com/egpbos/findFFTW/ | ||
| # Original version of this file: | ||
| # Copyright (c) 2015, Wenzel Jakob | ||
| # https://github.com/wjakob/layerlab/blob/master/cmake/FindFFTW.cmake, commit 4d58bfdc28891b4f9373dfe46239dda5a0b561c6 | ||
| # Modifications: | ||
| # Copyright (c) 2017, Patrick Bos |
There was a problem hiding this comment.
@dpiparo, OK to take over other people's find files?
There was a problem hiding this comment.
I think license-technically you should include the license text as well, which could also be done as a header in the FindFFTW.cmake file itself rather than as a separate file. But I won't press charges either way ;)
FFTW: It's BSD-2 originally and later BSD-3 |
and misc improvements Co-authored-by: Stephan Hageboeck <stephan.hageboeck@cern.ch> Co-authored-by: ferdymercury <ferdymercury@users.noreply.github.com>

Try unbloating the huge SearchInstalledSoftware
and use always subdirs for ExternalProject_Add for symmetry with other builtins